﻿using Senparc.Weixin.TenPayV3.Apis.BasePay;
using SportsPlatform.Base;
using SportsPlatform.Dto.WeiXinPay;
using SportsPlatform.Query.WeiXinPay;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SportsPlatform.WeiXinPay.IWeiXinPay
{
    /// <summary>
    /// 微信小程序支付
    /// </summary>
    public interface IWeiXinTenPayV3Service
    {
        /// <summary>
        ///  根据Code获取OpenId
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        GetCodeToOpenIdDto GetCodeToOpenId(GetCodeToOpenIdQuery query);

        /// <summary>
        /// 预下单
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<JsApiPreOrderDto>> JsApiPreOrder(JsApiPreOrderQuery query);

        /// <summary>
        /// 根据商户订单Id获取订单信息
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<OrderReturnJson>> OrderQueryByOutTradeNo(GetOrderInfoQuery query);

        /// <summary>
        /// 根据微信支付订单Id获取订单信息
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<OrderReturnJson>> OrderQueryByTransactionId(GetOrderInfoQuery query);

        /// <summary>
        ///退款 
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<RefundDto>> Refund(RefundQuery query);

        /// <summary>
        ///退款查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<RefundInfoDto>> RefundQuery(RefundQueryQuery query);
    }
}
